const action = (type, payload) => {
  return {
    type,
    payload
  };
};

export const HOT_SEARCH = parm => dispatch => {
  fetch("http://106.12.79.128:666/search/hot")
    .then(res => res.json())
    .then(res => {
      return dispatch(action("HOT_SEARCH", res.result.hots));
    });
};
